<div class="login-container">
    <div [ngStyle]="{'background-image': 'url(' + titleImageSrc + ')'}" class="login-header"></div>
    <div class="login-body">
        <div class="picture"></div>
        <div *ngIf="resetKey" class="login-form-container">
            <form [formGroup]="resetPasswordForm" class="login-form" nz-form style="margin-bottom: 40px;">
                <nz-form-item>
                    <nz-form-control>
                        <span style="color: white">{{resetText}}</span>
                    </nz-form-control>
                </nz-form-item>
                <nz-form-item>
                    <nz-form-control>
                        <nz-input-group [nzSuffix]="nzSuffixTemplate"
                                        nzPrefixIcon="anticon anticon-dr:password"
                        >
                            <input [(ngModel)]="resetPassword" formControlName="password" nz-input
                                   placeholder="请输入密码" type="password">
                        </nz-input-group>
                        <ng-template #nzSuffixTemplate>
                            <button (click)="doResetPassword()" [nzType]="'primary'" nz-button
                                    style="margin-right: -12px">修改密码
                            </button>
                        </ng-template>
                    </nz-form-control>
                </nz-form-item>
            </form>
        </div>
        <div *ngIf="!resetKey" class="login-form-container">
            <form (ngSubmit)="submitForm()" [formGroup]="validateForm" class="login-form" nz-form>
                <nz-form-item *ngIf="!systemLogin">
                    <nz-form-control>
                        <nz-input-group nzPrefixIcon="anticon anticon-dr:u">
                            <input [(ngModel)]="login.userName" formControlName="userName" nz-input
                                   placeholder="请输入用户名"
                                   type="text">
                        </nz-input-group>
                        <nz-form-explain
                            *ngIf="validateForm.get('userName').dirty && validateForm.get('userName').errors">
                            请输入用户名！
                        </nz-form-explain>
                    </nz-form-control>
                </nz-form-item>
                <nz-form-item>
                    <nz-form-control>
                        <nz-input-group nzPrefixIcon="anticon anticon-dr:password">
                            <input [(ngModel)]="login.password" formControlName="password" nz-input
                                   placeholder="请输入密码" type="password">
                        </nz-input-group>
                        <nz-form-explain
                            *ngIf="validateForm.get('password').dirty && validateForm.get('password').errors">
                            请输入密码！
                        </nz-form-explain>
                    </nz-form-control>
                </nz-form-item>
                <nz-form-item *ngIf="ssoService.getNeedVerifyCode()" style="position:relative;">
                    <nz-form-control class="cc">
                        <input [(ngModel)]="login.verifyCode" formControlName="verifyCode" nz-input
                               placeholder="请输入验证码" type="text">
                    </nz-form-control>
                    <div class="yzm-namer">
                        <img (click)="refreshVerifyCode()" [src]="verifyCodeSrc" alt="验证码" class="getVerifyCodeImage">
                    </div>
                </nz-form-item>
                <span *ngIf="errorMessage" class="errorMessage">{{errorMessage}}</span>
                <nz-form-item class="last-item">
                    <nz-form-control>
                        <label [(ngModel)]="login.rememberMe" class="rememberMe"
                               formControlName="rememberMe" nz-checkbox>
                            <span>记住我</span>
                        </label>
                        <a (click)="forgotPassword()" class="login-form-forgot">忘记密码</a>
                    </nz-form-control>
                </nz-form-item>
                <button (click)="doLogin()" [nzType]="'primary'" class="login-form-button" nz-button>登录</button>
            </form>
        </div>
    </div>
    <!--    <div class="footer-text">Powered by HYSD 1.0 ©2020 广东绘宇智能勘测科技有限公司</div>-->
</div>
